<?php


if(strlen($_GET["id"])>0){
	require_once("classes/db_functions.php");
	$db = new db_functions();
	
	$id = intval($_GET["id"]);
	$q = "SELECT * FROM rokovnik WHERE komitent_id=$id";
	$res = $db->select2($q);
	
	if($res[0]){
		foreach ($res as $row){
			foreach ($row as $k=>$v){
				echo "<b>$k:</b> $v<br />";
			}
			echo "<br />";
		}
	}else{
		echo "Nema poziva";
	}
	
	
}else{
	?>
	<form method="GET" action="">
		<input type="text" name="id">
		<input type="submit" value="pronadji">
	</form>
	<?php
}



?>